using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class PCIConsequenceMap : EntityTypeConfiguration<PCIConsequence>
    {
        public PCIConsequenceMap()
        {
            // Primary Key
            this.HasKey(t => t.PC_ID);

            // Properties
            this.Property(t => t.drug_type_id)
                .HasMaxLength(50);

            this.Property(t => t.PC_Consequence)
                .HasMaxLength(500);

            // Table & Column Mappings
            this.ToTable("PCIConsequence");
            this.Property(t => t.PC_ID).HasColumnName("PC_ID");
            this.Property(t => t.drug_type_id).HasColumnName("drug_type_id");
            this.Property(t => t.PC_Consequence).HasColumnName("PC_Consequence");
        }
    }
}
